package com.mmy.service.impl.sys;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.mmy.dao.sys.TSysAddressRepository;
import com.mmy.domain.sys.TSysAddress;
import com.mmy.service.sys.TSysAddressService;

@Service
public class TSysAddressServiceImpl implements TSysAddressService {
	@Autowired
	private TSysAddressRepository tSysAddressRepository;

	/* 获得最大收货编号 */
	public Object getMaxAddressID() {
		// TODO Auto-generated method stub
		return tSysAddressRepository.getMaxAddressID();
	}

	/* 创建收货地址 */
	public void save(int addressID) {
		// TODO Auto-generated method stub
		tSysAddressRepository.save(addressID);
	}

	/* 创建 修改收货地址 */

	public void save(TSysAddress tSysAddress) {
		// TODO Auto-generated method stub
		tSysAddressRepository.save(tSysAddress);
	}

	/* 查找该ID的收货信息 */
	public List<TSysAddress> findByiAddressID(int addressID) {
		// TODO Auto-generated method stub
		return tSysAddressRepository.findByiAddressID(addressID);
	}

	/* 删除收货信息 */
	public void deleteChecked(List<Integer> iAddressIDs) {
		// TODO Auto-generated method stub
		tSysAddressRepository.deleteChecked(iAddressIDs);
	}

}
